package com.lwt.hospital.dao;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.lwt.hospital.model.*;
import org.apache.ibatis.annotations.Param;

import javax.print.Doc;
import java.util.List;


public interface DemoDao extends BaseMapper<User> {

    List<User> selectAllUser();
    List<Doctor> selectAllDoc();
    List<Admin> selectAllAdmin();

    User selectUserInfo(@Param("user") User user);

    User selectUserByCard(@Param("card") String card);

    Doctor selectDocByNumber(@Param("number") String number);

    Admin selectAdminByCard(@Param("card") String card);


    User selectUserByPhone(@Param("phone") String phone);

    int insertUser(@Param("user") User user);

    int modifyUserInfo(@Param("user") User user);

    List<Appointment> selectAppointment(@Param("userId") long userId,@Param("status") String status);

    Doctor selectDoc(@Param("docId") long docId);

    Integer addNewQuestion(@Param("qu")Question qu);

    Integer addAppointment(@Param("ap")Appointment ap);

    List<Appointment> getOldAppointment(@Param("userId")long id);

    List<Question> getOldQuestion(@Param("userId")long id);

    Integer changePassword(@Param("docId") long id,@Param("password")String  password);

    List<Hospitalized> getPatient(@Param("room")String room);

    Integer outHospital(@Param("id") long id);

    List<Appointment> getAppointment(@Param("room") String room);

    Appointment getAAppointment(@Param("id") long id);

    Integer insertHospital(@Param("ho") Hospitalized hospitalized);

    Integer modifyAppointment(@Param("ap") Appointment appointment);

    List<Question> getQuestion(@Param("room") String room);

    Question getAQuestion(@Param("id")long id);

    Integer updateQuestion(@Param("qu") Question question);

    Integer delDoc(@Param("id") long docId);

    Integer insertDoc(@Param("doc") Doctor doctor);

    Integer updateDoc(@Param("doc")Doctor doctor);

    Doctor selectDocById(@Param("id")long docId);

    Integer selectMaxNumber();

    int delUser(@Param("id") long id);
}
